<style lang="scss">
  @import 'index';
</style>

<template>
  <div class="ga-container">
    <div class="ga-commission">
        <ul class="ga-cell">
          <li class="item"  v-for="(item,index) in log" :key="index">
            <div class="con">
              <p class="p1">{{item.log_txt}}</p>
              <p class="p2">{{item.add_time}}</p>
            </div>
            <span class="money">{{item.amount}}</span>
          </li>
        </ul>
    </div>
  </div>
</template>

<script>
import {isLogin} from '@/utils/handleLogin'
export default {

  data () {
    return {
       log: []
    }
  },
  methods: {
     async load () {
       this.$_util.ajax.post('https://guo-a.com/mapi/user/amountlog?token=' + this.$store.state.Token).then((res)=>{
           if(res.code === 200){
            this.log = res.data
           }
       })
     }
  },
  onShow () {
    isLogin(()=>{
      this.load()
    })
  }
}
</script>
